package com.qf.Servlet;

import com.qf.entity.Book;
import com.qf.service.impl.BookServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * @author Wy
 * @version V1.0
 * @Project day41-3
 * @Package ${PACKAGE_NAME}
 * @Description: ${TODO}
 * @Date 2022/5/15 14:55
 */
@WebServlet(name = "ToUpdateServlet" ,urlPatterns = "/toUpdate")
public class ToUpdateServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
               String bookIds = request.getParameter("bookIds");
       /* BookServiceImpl bookService = new BookServiceImpl();
        Book book = bookService.getBook(bookIds);
        HttpSession session = request.getSession();*/


            request.setAttribute("book",bookIds);
               request.getRequestDispatcher("/uppdateBook.jsp").forward(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                doPost(request,response);
    }
}
